Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localize exception message on limited result request dto #2473

Merged
merged 2 commits into from
Dec 26, 2019

Conversation

yekalkan
Copy link
Member

resolves #2468

@yekalkan yekalkan added this to the 2.0 milestone Dec 26, 2019
@yekalkan yekalkan merged commit a0adc32 into dev Dec 26, 2019
@@ -30,9 +32,13 @@ public class LimitedResultRequestDto : ILimitedResultRequest, IValidatableObject

public virtual IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
{
var l = validationContext.GetService(typeof(IStringLocalizer<AbpDddResource>)) as IStringLocalizer<AbpDddResource>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this into the if (MaxResultCount > MaxMaxResultCount) to not call GetService unnecessarily if the request is already valid.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've done it: c010c56

@hikalkan hikalkan deleted the Localize-exception-message-on-LimitedResultRequestDto branch January 8, 2020 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Localize exception message on LimitedResultRequestDto
2 participants